The present invention relates, in general, to object-oriented programming systems and, in particular, to a method and system for implementing a hierarchical program and procedure control mechanism in a "messy desk" windowing environment, in which numerous activities take place simultaneously within the same application.
Panels and windows are used interchangeably to refer to an interface component which presents objects and actions to users on a display screen. For example, the multi-tasking capability provided by the OS/2 operating system on the IBM PS/2 computer allows many applications to share the terminal monitor screen through the Presentation Manager component of OS/2. The window (panel) the user is currently interacting with is called the active window (panel).
The primary visual components of the user environment are the screen background, windows (panels), application icons, and a free-moving cursor. The concept of point-and-select is fundamental in a user-controlled interface, i.e., the user moves the cursor to a point that is visible anywhere on the screen and then selects it. A change of scope occurs when the cursor is moved beyond the range of the currently selected panel or window. In a messy desk windowing environment, a user can change scope from panel to panel in an apparently arbitrary and unpredictable manner. Selecting another panel brings it into the foreground and makes it active. Transparent to the user is the underlying control mechanism which results in the new panel choice being made the active panel. Internal program logic is needed to control this apparently unstructured procedural flow. Many messy desk windowing applications utilize a single master approach in which there is kept a single master list of all panels on the screen. The application must then be sufficiently knowledgeable with respect to the particular characteristics of each panel to decide which to select. Alternatively, the application would have to query each panel until it found one willing to accept the user input. This approach requires that the list of panels be traversed half-way on average for each change of scope command. Unlike this traditional linked-list approach, this invention provides a process that implements a hierarchical program and procedure control while simultaneously supporting a completely uninhibited change of scope.
In the prior art, examples of linked-list representations of panels can be found in IBM Technical Disclosure Bulletin, Volume 30, No. 2, July 1987 at pages 736-738, and in U.S. Pat. No. 4,845,644 issued to Anthias, et al. In the cited IBM Technical Disclosure bulletin, panels are displayed according to a path sequence referenced from the ordering. An incidence matrix is used at panel creation time to specify the paths among the panels, thereby eliminating the need to program logical constructs within the application program. Anthias et al. disclose a method for altering the priority display of panels, but essentially rely on a last used ordering scheme.
With the increasing complexity of computer-based systems, object oriented programming has received increased attention and investigation. In object oriented programming systems, the primary focus is on data rather than functions. An object is a data structure and a set of operations or functions that can access the data structure. The data structure can be represented by a frame containing a number of slots with each slot containing an attribute of the data. Each attribute may be a primitive (i.e., an integer or a string) or an object reference, that points to another object's instance or instances. Each operation (function) that can access the data structure is called a method. Each defined object is usually manifested in a number of instances, with each instance containing the particular data structure for a particular example of the object. The primary characteristics of object-oriented programming systems are encapsulation and inheritance. A frame is encapsulated by its methods, which means all access to the data structure is handled by the surrounding methods, thus providing data independence. The inheritance property allows previously written programs to be broadened by creating new superclasses and subclasses of objects. Each subclass inherits the frame and methods of its superclass.
Object oriented programming systems typically implement a messy desk environment in which numerous activities take place simultaneously within the same application. In an object oriented computer system, work is accomplished by sending action request messages to an object which contains (encapsulates) data. The object will perform the requested action on the data according to its predefined methods. An object's class defines the types and meanings of the data and the action requests (messages) that the object will honor. The individual objects containing data are called instances of the class. The programs performing the requested actions are called methods of the class.
Object classes can be defined to be subclasses of other classes. Subclasses inherit all the data characteristics and methods of the parent class. Subclasses can add additional data and methods and can redefine any data elements or methods of the parent class. A message is handled using the data in the object instance and the method in its class or its parent class, as long as the target object either defines a method to handle the message or has a parent class that defines such a method.
The inheritance property of object oriented programming systems is relied upon in the present invention to enable a systematic hierarchical inter-panel process control mechanism.